package com.yc.supermarket.mapper;

import com.yc.supermarket.entity.*;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface GoodsInfoMapper {
    public List<Commodity> getCommoditiesByComId(Integer commodityId);
    public List<Commodity> getCommoditiesByTypeId(Integer typeId);
    public List<Commodity> getCommodities();
    public List<ProductType> getProductType();
    public List<Commodity> getCommodityList();
    public List<User> getUserByName(String userName);
    public int insertMember(Member member);
    public int addCollect(Collect collect);
    public User getUserByUserName(String userName);
    public void updateUserBalance(@Param("userId") int userId, @Param("balance") BigDecimal balance);
    public List<Member> getUserById(int userId);
    public void updateMemberBalance(@Param("userId") int userId,@Param("balance") BigDecimal balance);
    public Commodity getComByName(String commodityName);
    public List<Commodity> selectCommoditiesByUserId(@Param("userId") int userId);
    public int deleteCollect(@Param("userId") int userId,@Param("commodityId") int commodityId);

}
